#ifndef TCP_LISTEN_THREAD_H
#define TCP_LISTEN_THREAD_H

#include <windows.h>
#include "memberCenter.h"
#include "groupCenter.h"
#include "myThread.h"

class TCPListenThread : public MyThread
{
public:
	TCPListenThread();
	TCPListenThread(memberCenter *member_center, groupCenter *group_center);
	~TCPListenThread();

	void init(memberCenter *member_center, groupCenter *group_center);

private:
	UINT WINAPI threadWork();

	void handleGroupInvitation(char *str_message);
	void handleSelfInfo(char *str_message);

private:
	memberCenter *m_member_center;
	groupCenter  *m_group_center;
	static bool m_isrunning;
};

#endif